package com.cpd.blog.common.constant;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;

/**
 * 统一管理 RedisKey
 *
 * @Author: Copydown
 * @Date: 2022/04/27/23:21
 */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class RedisKey {
    /**
     * 项目标志
     */
    private static final String PROJECT_SIGN = "timechapter";
    private static final String LINK_SEP = ":";
    private static final String PROJECT_LINK = PROJECT_SIGN + LINK_SEP;
    /**
     * 前中后缀
     */
    private static final String LOCK_PREFIX = "lock:";
    private static final String TOKEN_PREFIX = "token:";
    private static final String CODE_PREFIX = PROJECT_LINK + "code:";
    private static final String EMAIL_PREFIX = CODE_PREFIX + "email:";

    /**
     * 功能项
     */
    public static final String HOT_ARTICLE = PROJECT_LINK + "hotArticle";
    public static final String NEW_ARTICLE = PROJECT_LINK + "newArticle";
    public static final String TOKEN = PROJECT_LINK + TOKEN_PREFIX;
    public static final String IS_LOGIN = PROJECT_LINK + "loginMap";
    public static final String EMAIL_PWD_CODE = EMAIL_PREFIX + "pwd:";
    public static final String SHED_LOCK = LOCK_PREFIX + "ShedLock";


}
